﻿using System;
using System.Collections.Generic;
using System.Text;

namespace _01单例模式
{
    /// <summary>
    /// 在构造函数里new(), 在方法返回
    /// </summary>
    public class SingleSecond
    {
        private static SingleSecond _SingleSecond = null;
        private SingleSecond() { }
        static SingleSecond()
        {
            _SingleSecond = new SingleSecond();
          
        }
        public  static  SingleSecond GetInstance()
        {
            return _SingleSecond;
        }
    }
}
